#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: demo01.py 
@version:
@time: 2022/11/08 
"""
import subprocess
import time

start = time.time()
sleep_procs = []
for _ in range(10):
    proc = subprocess.Popen(['sleep', '1'])
    sleep_procs.append(proc)

for proc in sleep_procs:
    proc.communicate()

end = time.time()
delta = end - start
print(f'Finished in {delta:.3} seconds')